Next | Prev | Up | Top | Contents | Index

Assigning the fasthz Processor

When high precision timers are used, timer interrupts occur more frequently. In machines that lack a clock comparator, fast timer interrupts cause overhead processing (see "Fast Timers Without a Clock Comparator"). A particular CPU can be designated to handle this work. You can use the -f parameter of mpadmin to find out which CPU has responsibility:

% mpadmin -f 0

With root privilege, mpadmin can be used to specify the CPU to handle the fast timer.

mpadmin -f 1

The equivalent operation from software uses sysmp(), as shown in Example 6-8.

Example 6-8 : Setting the fasthz CPU

#include <sys/sysmp.h>
int setFasthzTo(int cpu)
{
   int ret = sysmp(MP_FASTCLOCK,cpu);
   if (-1 == ret) perror("sysmp(MP_FASTCLOCK)");
   return ret;
}

Note: On Challenge/Onyx and POWER-Challenge systems, assigning the fasthz CPU is allowed, but has no effect. Timer interrupts are taken only as required, not at the fasthz rate, and are targeted to the CPU where they were initiated. (See "Timer Management in Challenge, Onyx, and POWER-Challenge".)


Next | Prev | Up | Top | Contents | Index